import Vue from 'vue'
import VueRouter from 'vue-router'
// import Hmoe from '../views/Home'
// import Layout from '../views/Layout.vue'
import Search from '../views/Search.vue';

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Layout',
    component: () => import('../views/Layout.vue'),
    children: [{
        path: '/',
        name: 'Home',
        component: () => import('../views/Home')
      },
      {
        path: '/topic',
        name: 'Topic',
        component: () => import('../views/Topic/Topic.vue')
      },
      {
        path: '/mine',
        name: 'Mine',
        component: () => import('../views/Mine.vue')
      },
      {
        path: '/search',
        name: 'Search',
        component: Search
        // () => import('../views/Search.vue')
      },
    ]
  },
  {
    path: '/more/:tit',
    name: 'More',
    component: () => import('../views/Home/More.vue')
  },
  {
    path: '/more/:tit',
    name: 'More',
    component: () => import('../views/Home/More.vue')
  },
]

const router = new VueRouter({
  routes,
  linkActiveClass: "active"
})

export default router